#!/bin/bash

build_method() {
    bazel build //:app
}

clean_method() {
    bazel clean
    rm -rf log/*
}

set -e

if [ "$#" -ne 1 ]; then
    echo "Wrong number of parameters."
    exit 1
fi

case "$1" in
    build)
        build_method
        ;;
    clean)
        clean_method
        ;;
    *)
        echo "Unknown parameters."
        exit 1
        ;;
esac
